Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[components] Remove AutomationConditionModel in favor of raw python object #26649

Conversation

OwenKephart
Copy link
Contributor

Summary & Motivation

As title -- this pattern generally allows us to avoid creating parallel schemas for all of our library objects.

How I Tested These Changes

Changelog

NOCHANGELOG

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 813dc40 to 483060a Compare December 20, 2024 20:35
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from aa2a754 to 63116a8 Compare December 20, 2024 20:35
Comment on lines +33 to +35
automation_condition: Optional[Union[str, AutomationCondition]] = RenderingScope(
Field(None), required_scope={"automation_condition"}
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this field should actually just be of type Optional[str].

I want to do a followup here where we do something like:

automation_condition: Optional[str] = RenderedField(Optional[AutomationCondition], required_scope={"automation_condition"})

where we can have separate type checking for the rendered value

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be a great followup.

Leave comment to this effect explaining the next steps.

Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so great

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 483060a to 38baab7 Compare December 20, 2024 20:43
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from 63116a8 to cf4029f Compare December 20, 2024 20:43
@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 38baab7 to 67dc5d0 Compare December 20, 2024 20:55
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from cf4029f to a5770fd Compare December 20, 2024 20:55
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crying-yes

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 67dc5d0 to 3deb344 Compare December 23, 2024 20:48
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from a5770fd to 2b0ff0d Compare December 23, 2024 20:48
@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 3deb344 to 7eb1d13 Compare December 23, 2024 22:04
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from 2b0ff0d to 5fa066b Compare December 23, 2024 22:05
@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 7eb1d13 to 8fb785a Compare December 30, 2024 15:41
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from 5fa066b to bf1de3b Compare December 30, 2024 15:41
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reqing changes based on standup.

  • Separate class for DSL schema.
  • Explicit conversion to Dagster domain object
  • Optional dynamic layer (later) will automatically convert schema to domain object when possible to avoid duplication of dumb properties.

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 8fb785a to f4d3125 Compare December 30, 2024 22:37
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from bf1de3b to 3fb0a0b Compare December 30, 2024 22:37
Copy link
Contributor Author

OwenKephart commented Dec 31, 2024

Merge activity

  • Dec 31, 11:02 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 31, 11:08 AM EST: Graphite rebased this pull request as part of a merge.
  • Dec 31, 11:09 AM EST: A user merged this pull request with Graphite.

@OwenKephart OwenKephart changed the base branch from 12-20-_components_templating_for_asset_attributes to graphite-base/26649 December 31, 2024 16:03
@OwenKephart OwenKephart changed the base branch from graphite-base/26649 to master December 31, 2024 16:05
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from 3fb0a0b to d2563c8 Compare December 31, 2024 16:07
@OwenKephart OwenKephart merged commit 26e92a7 into master Dec 31, 2024
1 check was pending
@OwenKephart OwenKephart deleted the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch December 31, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants